package org.etom.impl.ui.util;

import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.etom.impl.ui.Activator;

/**
 * The class cares about the logging.
 */
public class Logger {
  
  /*
   * The instances are hidden.
   */
  private Logger() {
    throw new UnsupportedOperationException(CommonMessages.Unsupported_Operaion);
  }
 
  /**
   * The method logs the given error.
   * @param message - the error message
   * @param cause - the cause for the error
   */
  public static void ERROR(String message, Throwable cause) {
    IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, message, cause);
    ILog logger = Activator.getDefault().getLog();
    logger.log(status);
  }
  
}
